package com.example.spring.entity;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 通用消息类
 *
 * @param <T> data的类型
 */
@Data
@NoArgsConstructor
public class Msg<T> {
    private Long timestamp = System.currentTimeMillis();
    private String errMsg;
    private T data;

    public Msg(String errMsg) {
        this.errMsg = errMsg;
    }
}
